package com.project.bean;

import java.time.LocalDate;
import java.util.List;

/**
 * 主贴实体
 */
public class MainPostBean {
    /**主贴id*/
    private int id;
    /**主题*/
    private String theme;
    /**内容*/
    private String content;
    /**作者*/
    private String author;
    /**发贴时间*/
    private LocalDate postDate = LocalDate.now();
    /**频道id*/
    private ChannelBean channel;
    /**回帖集合*/
    private List<ReturnPostBean> returnList;

    public MainPostBean(String theme, String content, String author, int cId) {
        this.theme = theme;
        this.content = content;
        this.author = author;
        this.channel = new ChannelBean();
        channel.setId(cId);
    }

    public MainPostBean() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTheme() {
        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public LocalDate getPostDate() {
        return postDate;
    }

    public void setPostDate(LocalDate postDate) {
        this.postDate = postDate;
    }

    public ChannelBean getChannel() {
        return channel;
    }

    public void setChannel(ChannelBean channel) {
        this.channel = channel;
    }

    public List<ReturnPostBean> getReturnList() {
        return returnList;
    }

    public void setReturnList(List<ReturnPostBean> returnList) {
        this.returnList = returnList;
    }

    @Override
    public String toString() {
        return "MainPostBean{" +
                "id=" + id +
                ", theme='" + theme + '\'' +
                ", content='" + content + '\'' +
                ", author='" + author + '\'' +
                ", postDate=" + postDate +
                ", channel=" + channel +
                ", returnList=" + returnList +
                "}/n";
    }
}
